<?php
/**
 * Created by PhpStorm.
 * User: dungnt13
 * Date: 12/13/14
 * Time: 8:58 AM
 */
namespace App\Services;

use Input;

class DInput
{
    public function get($key, $alternate = '', $type = '')
    {
        $result = '';
        $result = Input::get($key, $alternate);
        if ($type == 'number')
//            $result = is_numeric($result) ? $result : $alternate;
            $result = filter_var($result, FILTER_SANITIZE_NUMBER_INT);
        else if ($type == 'strip')
            $result = strip_tags($result);
        return $result;
    }
}